package com.zgjkhis.modules.charges.service;

import com.alibaba.fastjson.JSONArray;
import com.zgjkhis.common.service.BaseService;
import com.zgjkhis.modules.charges.domain.Logistics;
import com.zgjkhis.modules.charges.domain.PrescriptionOrder;
import com.zgjkhis.modules.charges.service.dto.LogisticsRouteDto;
import com.zgjkhis.modules.charges.service.dto.LogisticsStatusDto;
import org.springframework.http.ResponseEntity;

import java.util.List;

/**
 * @Author yxl
 * @Description 物流service
 * @Date 2021/7/19 11:16
 **/
public interface LogisticsService extends BaseService<Logistics> {

    /**
     * 物流下单
     * @param order
     * @param logistics
     * @param orderNOs
     * @param apiOrderNos
     */
    void addOrder(PrescriptionOrder order, Logistics logistics, String[] orderNOs, List<String> apiOrderNos);

    /**
     * 查询物流订单
     * @param orderNo
     * @return
     */
    List<Logistics> queryOrder(String orderNo);

    /**
     * 查询顺丰物流信息
     * @param orderNo
     * @return
     */
    List<LogisticsRouteDto> queryLogistics(String orderNo);

    /**
     * 查询所有未完成的订单
     * @return
     */
    List<Logistics> queryNoComplete();

    /**
     * 查询订单状态
     * @param orderNo
     * @return
     */
    List<LogisticsStatusDto> requestStatus(String orderNo);

    /**
     * 物流取消
     * @param bspOrderNo
     * @return
     */
    ResponseEntity<Object> cancelThirdOrder(String bspOrderNo);

    /**
     * 查询物流路由
     * @param logisticsId
     * @return
     */
    JSONArray queryLogisticsFromInterface(String logisticsId);
}
